import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/views/Index'
import Register from '@/views/register/register'
import OnLineMovie from '@/views/moves/OnLineMovie'
import OnNextMovie from '@/views/moves/OnNextMovie'
import FilmCart from '@/views/orders/cart/FilmCart'
import SeatSelect from'@/views/orders/seat/index'
import BuyTicket from "../views/moves/buyTickets/BuyTicket";
import SellingTickets from "../views/moves/buyTickets/SellingTickets";
import MovieIntroduce from "../views/moves/buyTickets/MovieIntroduce";
import orderNextMovies from "../views/moves/nextMovie/orderNextMovies";
import toOrder from "../views/moves/nextMovie/toOrder";
import showTicTimes from "../views/moves/nextMovie/showTicTimes";
import movieInfors from "../views/moves/nextMovie/movieInfors";
import Login from "@/views/login/Login";
import SeatSell from "../views/orders/seat/seatSell";
import Information from "@/views/information/Information";
import Informationtwo from "@/views/information/Informationtwo";
import MyInformation from "../views/information/MyInformation";
import OrderMovie from "@/views/moves/buyTickets/OrderMovie";

/*订单信息的导入*/
import CommintOrder from "../views/orders/order/CommintOrder";
import CreateOrder from "../views/orders/order/CreateOrder";
import CreateCode from "../views/orders/order/CreateCode";
import  CommintOrderCart from  "../views/orders/order/CommintOrderCart"
import  MyOrder from "../views/orders/order/MyOrder"
import  Ordering from "../views/orders/order/Ordering"
import  UnFinish from "../views/orders/order/UnFinish"
import HistroyOrder from "../views/orders/order/HistroyOrder"
Vue.use(Router);
export default new Router({
    routes:[
      {
        path:'/index',//主页
        component: Index,
        name:'index'//'FilmCart.vue'
      },
      {
        path: '/register',//注册
        component: Register
      } ,

      {
        path:'/onlinemovie',// 热映影片
        component:OnLineMovie,
        name:'onlinemovie'
      } ,
      {
        path:'/onnextmovie',//即将上映
        component:OnNextMovie,
        name:'onnextmovie'
      },
      {
        path:'',
        redirect:'SellingTickets'
      },
      {
        path:'/ordermovie',
        component:OrderMovie, //预约电影页面
        name:'ordermovie'
      },
      {
        path:'/buyticket',
        component:BuyTicket,        //买票页
        name:'BuyTicket',
        children:[
          {
            path:'',
            redirect:'SellingTickets'
          },
          {
            path:'/toSellingTis',     //子路由，买票信息页包括日期信息
            component:SellingTickets,
            name:'SellingTickets',
          },
          {
            path:'/movieIntroduce',
            component:MovieIntroduce,
            name:'MovieIntroduce'
          }
        ]
      },
      {
        path: '/toorderNext',
        component: orderNextMovies,        //未上映
        name: 'orderNextMovies',
        children: [
          {
            path: '/showTicTimes',     //子路由，预约票信息页包括日期信息
            component: showTicTimes,
            name: 'showTicTimes',
            children: [{
              path: '/toOrder',    //孙子路由，票场次信息
              component: toOrder,
              name: 'toOrder'
               }]
          },
          {
            path: '/movieInfors',
            component: movieInfors,
            name: 'movieInfors'
          }
        ]
      },
      {
        path:'/filmcart',//购物车界面
        component:FilmCart,
        name:'filmcart'
      },
      {
        path:'/seatselect',//选座占座--预约
        component:SeatSelect,
        name:'seatselect'
      },
      {
        path:'/seatSell',//选座占座--购买
        component:SeatSell,
        name:'seatSell'
      },
      {
        path:'/buyticket',//买票
        component:BuyTicket,
        name:'BuyTicket'
      },
      {
        path:'/login',//登陆
        component:Login,
        name:'Login'
      },
      {
        path: '/information',//用户信息
        component: Information,
        name: "Information",
        children: [
          {
            path: '/toinfor', //修改资料
            component: Informationtwo,
            name: "Informationtwo"
          },
          {
            path: '/tomyinfor',//个人资料
            component: MyInformation,
            name: "MyInformation"
          },
          {
            path: '/myOrder',
            component: MyOrder,  //个人订单
            name: 'MyOrder',
            children: [
              {
                path: '/ordering',
                component: Ordering, //正在进行中订单
                name: 'Ordering'
              },
              {
                path: '/unFinish',
                component: UnFinish,  //未支付订单
                name: 'UnFinish'
              },
              {
                path: '/histroyOrder',
                component: HistroyOrder, //历史订单
                name: HistroyOrder
              }
            ]
          },
        ]
      },
      /*提交订单*/
      {
        path:'/tocommintorder',
        component:CommintOrder,
        name:'tocommintorder'
      },
      /*订单生成界面*/
      {
        path:'/tocreateorder',
        component:CreateOrder,
        name:'tocreateorder'
      },
      /*与购物车交付的界面*/
      {
        path:'/tocommintordercart',
        component:CommintOrderCart,
        name:'tocommintordercart'
      },
      /*二维码的生成界面*/
      {
         path:'/tocreatecode',
         component:CreateCode,
         name:'tocreatecode'
      }
    ]
})
